import UseSearchForm from '@/hooks/useSearchFormHooks'
import homeApi from '@/api/homeApi'
import { AxiosResponse } from 'axios'
import { FindExamList } from '@/views/Home/service'
const { useSearchForm } = UseSearchForm
const { examList } = useSearchForm
class PcHomeService {
  static pcHomeService = new PcHomeService()
  async findExamListWithPage() {
    const res: AxiosResponse<FindExamList> = await homeApi.findExamList(
      UseSearchForm.page,
      UseSearchForm.size,
      UseSearchForm.form
    )
    console.log(res)
    UseSearchForm.useSearchForm.examList.value = res.data.rows
  }
  async findReportPdfById(id: string) {
    const res = await homeApi.findReportPdf(id)
    console.log(res)
  }
}

export default PcHomeService
